package com.bluetrum.devicemanager.cmd.payloadhandler;

import androidx.annotation.NonNull;

import com.bluetrum.devicemanager.models.SpatialAudioMode;

public class SpatialAudioModePayloadHandler extends PayloadHandler<SpatialAudioMode>{

    public SpatialAudioModePayloadHandler(@NonNull byte[] payload) {
        super(payload);
    }

    @Override
    public SpatialAudioMode call() throws Exception {
        byte[] payload = getPayload();
        if (payload.length == 1) {
            byte mode = payload[0];
            return new SpatialAudioMode(mode);
        }
        return null;
    }
}
